#ifndef __OPERATIONMODE_OFB_HPP__
#define __OPERATIONMODE_OFB_HPP__

#include "OperationMode.hpp"
#include "Block.hpp"

class OperationMode_OFB : public OperationMode {

	private:
		unsigned int j;
		Block R;

	public:
		/**
		 * @param system encryption system
		 * @param j number of bits of each chunk to be encrypted/decrypted
		 */
		OperationMode_OFB(Algorithm &system, unsigned int j);

		/**
		 * @param system encryption system
		 * @param iv initialization vector
		 * @param j number of bits of each chunk to be encrypted/decrypted
		 */
		OperationMode_OFB(Algorithm &system, Block& iv, unsigned char j);

		Block encrypt(const Block &plaintext);

		Block decrypt(const Block &ciphertext);

};
#endif
